statefiles: don't write empty hosts files
authorDavid Härdeman <[email protected]>
Tue, 9 Dec 2025 09:11:08 +0000 (10:11 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Wed, 10 Dec 2025 05:36:39 +0000 (06:36 +0100)
commitca00527e5fc3d8d2b8c1a60fbeb6a25e2bf68674
treee820791d7a969372c8d38eecb90b40bfd923d929
parent24b70c5c2ff06a021e079e9f157cba6165aeab8a
statefiles: don't write empty hosts files

This is mostly cosmetic, skip writing out hosts files for interfaces
where it makes little sense to do so (i.e. where the hosts file will
anyway be empty).

Closes: https://github.com/openwrt/odhcpd/issues/338
Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/342
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/statefiles.c